package cn.edu.scau.cmi.luotiansheng.simpleFactoryMethod;

import cn.edu.scau.cmi.luotiansheng.simpleFactoryMethod.domain.Beef;
import cn.edu.scau.cmi.luotiansheng.simpleFactoryMethod.domain.Chicken;
import cn.edu.scau.cmi.luotiansheng.simpleFactoryMethod.domain.Meat;
import cn.edu.scau.cmi.luotiansheng.simpleFactoryMethod.domain.Pork;

public class MeatFactory {
	
	public static Meat getMeat(String meat) {
		
		if(meat.equalsIgnoreCase("Beef")) {
			return new Beef();
		}

		if(meat.equalsIgnoreCase("Pork")) {
			return new Pork();
		}

		if(meat.equalsIgnoreCase("Chicken")) {
			return new Chicken();
		}
		return null;
		
	}

}
